namespace Terra.Data.Entities;

/// <summary>
/// 实体接口
/// </summary>
public interface IEntity
{
    /// <summary>
    /// 获取实体是否为临时状态
    /// </summary>
    bool IsTransient();
}

/// <summary>
/// 带有主键的实体接口
/// </summary>
/// <typeparam name="TKey">主键类型</typeparam>
public interface IEntity<TKey> : IEntity
{
    /// <summary>
    /// 主键
    /// </summary>
    TKey Id { get; set; }
}